import 'package:flutter_member_mvvm/base/api_response.dart';
import 'package:parse_server_sdk/parse_server_sdk.dart';

class LoginService {

  // 获得验证码
  Future<ApiResponse> getVerificationCode(String phone)async{
    final ParseCloudFunction function = ParseCloudFunction('smsShortCode');

    final Map<String, String> params = <String, String>{
      'phoneNumber': phone,
      'callingCode': "853",
      'action': "login"
    };
    return getApiResponse(await function.execute(parameters: params));
  }
}